-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix flaky test in 95_search_after_shard_doc.yml #19746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Binlong Gao <[email protected]>
|
❌ Gradle check result for 9430754: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 0c444a5: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for b12ccca: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for b12ccca: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 87fbd29: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 87fbd29: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19746 +/- ##
============================================
- Coverage 73.25% 73.19% -0.06%
+ Complexity 71612 71556 -56
============================================
Files 5785 5785
Lines 326905 326900 -5
Branches 47280 47280
============================================
- Hits 239480 239282 -198
- Misses 68220 68419 +199
+ Partials 19205 19199 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@reta, could you help to review this PR, thanks! |
@gaobinlong my apologies, missed it somehow, will take a look shortly |
reta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is clever workaround of limitations we have in our test scaffolding, thank you @gaobinlong !
Description
See gradle check log: https://build.ci.opensearch.org/job/gradle-check/66006/console, the test is flaky when there're more than 10 documents in the shard 0, so the 2nd page starts from sort value 10, 11, and then a big value 4294967296, so when checking
- gt: { hits.hits.2.sort.0: $prev }, the right value and also the expected value is 11, left is 4294967296, we check the type of the expected value firstly and then convert the left value to the same type which is integer :OpenSearch/test/framework/src/main/java/org/opensearch/test/rest/yaml/section/Assertion.java
Line 94 in 29b113a
, so NumberFormatException is thrown.
The solution is to check the sort values reversely from the last document to the first document and use
ltinstead, at this point, we convert a small value to a long value, no error happens.Related Issues
#14408
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.